package com.tengju.settlement.domain.model.depository;

import com.tengju.settlement.domain.model.account.UserIdCode;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DepositoryBankCardRepository {

    List<DepositoryBankCard> getByDepositoryAccountIdStatus(UserIdCode idCode, DepositoryAccountId accountId, List<BindStatus> bindStatus);


    List<DepositoryBankCard> getByDepositoryAccountIdsStatus(List<DepositoryAccountId> accountIds, List<BindStatus> bindStatus);

//    List<DepositoryBankCard> getByIdCodesStatus(List<UserIdCode> idCodes, List<BindStatus> bindStatus);

    DepositoryBankCard getByDepositoryAccountIdCardNo(UserIdCode idCode, DepositoryAccountId accountId, String bankNo);

    DepositoryBankCard getByCardNo(UserIdCode idCode, String cardNo);

    void updateBindStatus(DepositoryBankCard depositoryBankCard);


    void updateByBankCardId(DepositoryBankCard depositoryBankCard);

    void save(DepositoryBankCard depositoryBankCard);

    void bindCardCntInit(UserIdCode idCode, int bindCardCnt, int expireHours);

    void bindCntIncrement(UserIdCode idCode);

    Integer bindCardCnt(UserIdCode idCode);


    void delCardCnt(UserIdCode idCode);

    boolean existCntKey(UserIdCode idCode);

    Long bindCntTtl(UserIdCode idCode);

}
